﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="Admin_Menu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
        .style1
        {
            width: 126px;
        }
        .style2
        {
            width: 201px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">    
    <table style="width:100%;">
        <tr>
            <td>
                <table style="width:100%;">
                    <tr>
                        <td class="style1">
                            Menu Chính</td>
                        <td class="style2">
                            Nhãn menu</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style1">
                            <asp:DropDownList ID="cmbParent" runat="server" Width="200px" 
                                AutoPostBack="True" onselectedindexchanged="cmbParent_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td class="style2">
                            <asp:TextBox ID="txtLableVi" runat="server" Width="200px"></asp:TextBox>
                        </td>
                        <td>
                            <asp:Button ID="butAdd" runat="server" Text="Thêm" onclick="butAdd_Click" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            &nbsp;</td>
                        <td class="style2">
                            <asp:CheckBox ID="chkParent" runat="server" Text="Menu gốc" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                Danh sách menu con</td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="GridViewMenu" runat="server" AutoGenerateColumns="False" 
                    BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" 
                    CellPadding="4" DataKeyNames="ID_MN" 
                    onrowcancelingedit="GridViewMenu_RowCancelingEdit" 
                    onrowediting="GridViewMenu_RowEditing" 
        onrowupdating="GridViewMenu_RowUpdating">
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <Columns>
                        <asp:BoundField DataField="ID_MN" HeaderText="ID" ReadOnly="True">
                            <ItemStyle HorizontalAlign="Center" Width="30px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="LableVI" HeaderText="Nhãn menu">
                            <ItemStyle Width="200px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="sort" HeaderText="Vị trí" />
                        <asp:CommandField CancelText="K Lưu" EditText="Sửa" ShowEditButton="True" 
                            UpdateText="Lưu" />
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:Button ID="butXoa" runat="server" onclick="butXoa_Click" Text="Xóa" 
                                    onclientclick="return (confirm('Xóa thật chứ?'));" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkXoa" runat="server" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
